package com.yunji.app.system;

import com.yunji.common.base.BaseController;
import com.yunji.common.base.response.Response;
import com.yunji.common.base.response.ResponseHelper;
import com.yunji.system.service.ISysConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Project: yunji-coffee
 * @Package: com.yunji.app.system
 * @Title: GateWayConfigController
 * @Description: TODO:
 * <p>
 * History:
 * Date                     Version     Author          Summary
 * ============================================================
 * 2024-07-20 11:14:26      V1.0        HuaAo       新建类
 */
@Api(tags = "移动端-系统配置信息")
@RestController
@RequestMapping("/gateway/config")
public class GateWayConfigController extends BaseController {

    @Resource
    ISysConfigService configService;

    /**
     * 根据参数键名查询参数值
     */
    @ApiOperation("分局参数键名查询参数值")
    @GetMapping(value = "/configKey/{configKey}")
    public Response<String> getConfigKey(@PathVariable String configKey) {
        return ResponseHelper.success(configService.selectConfigByKey(configKey));
    }

}